package cn.edu.just.firstjavaapp.l11;

public class StringDemo {
    public static void main(String[] args) {
        String s = "hello";
        String s2 = "hello";
        String s3 = new String("hello");
        System.out.println(s2==s);
        System.out.println(s3==s);
        System.out.println(s3.equals(s));
        System.out.println(s.length());
        System.out.println("--------");
        float floatVar = 3.1415F;
        int intVar = 100;
        String stringVar = "Tom";

        String fs;
        fs = String.format("The value of the float variable is %f, " +
                "while the value of the " + "integervariable is %d, " +
                "and the string is %s", floatVar, intVar, stringVar);
        System.out.println(fs);
        System.out.println("-------");
        int i = 1000;
        String str = String.valueOf(i);
        System.out.println(str);

        String str2 = 1+"";

        System.out.println("h"+1+3);

    }
}
